{#include file="top.php"#}
<script type="text/javascript" src="/js/ZeroClipboard.js"></script>
<script type="text/javascript">
    function select(){
        var s = $("#select_c");
        if(parseInt(s.attr('v'))==0){
            s.show();
            s.attr('v',1);
        }else{
            s.hide();
            s.attr('v',0);
        }
    }

    function showp(i){
        if(parseInt(i)==1){
            $('#tag2').hide();
            $('#tag1').show();
            $("#point_bt2").removeClass("curr");
            $("#point_bt1").addClass("curr");
        }else{
            $('#tag1').hide();
            $('#tag2').show();
            $("#point_bt1").removeClass("curr");
            $("#point_bt2").addClass("curr");
        }
    }

    var clip = null;
    $(document).ready(function(){
        clip = new ZeroClipboard.Client();
        clip.setHandCursor( true );

        clip.addEventListener('load', function (client) {
        });

        clip.addEventListener('mouseOver', function (client) {
                clip.setText( $('#share_url').val() );
        });

        clip.addEventListener('complete', function (client, text) {
                alert('複製成功');
        });

        clip.glue( 'copy_bt');
    });
</script>
<div class="body">
    <div class="main fl">
        <div class="tips" style='{#if empty($msg)#}display:none;{#/if#}'>
            <strong class="ir warn_icon"><span>提示</span></strong>
            <label id='message'>{#$msg#}</label>
        </div>

        <div class="ibox clearfix">
            <figure class="imgbox">
                <a href="{#optimize_url('person', 'report','username='|cat:$member.username)#}"><img src="{#$member.photo_l#}"  width=77> </a>
            </figure>
            <h3 class="title">
                <a class="title" href="{#optimize_url('person', 'report','username='|cat:$member.username)#}">{#$member.username#}</a>
                <span class="myreport">我的報告：{#$member.reports_count#}</span>
                <a href="/member.php?action=MyReg" class="btn_b btn_b_editfile"><strong>編輯個人檔案</strong></a>
            </h3>
<!--            <p>年齡：{#$member.age_group#}</p>
            <p>膚質：{#$member.body_skin#}</p>
            {#if $member.fav_brand_top#}
            <p>最愛品牌：{#$member.fav_brand_top#}
                {#if $member.fav_brand#}
                <i class="tri down" onclick="$('.brand_all').slideToggle('fast');"></i>
                {#/if#}
            </p>
            {#/if#}
            <div class="brand_all" style="display:none">{#$member.fav_brand#}</div>

            {#if $member.reports_count#}<p>提交報告：{#$member.reports_count#}</p>{#/if#}
            {#if $memberData.facebook.id#}<p>已綁定facebook {#$memberData.email#}</p>{#/if#}-->

            <div class="point_record">
                <table class="point_record_tb">
                    <tr>
                        <td class="td1">
                            <a href="/member_center.php?action=points#show_point">詳細記錄</a>
                        </td>
                        <td class="td2">
                            <a href="{#optimize_url('help', 'show','page=4')#}" target="_blank">如何賺分？</a>
                        </td>
                        <td class="td3">
                            <span class="now">現有
                                iTrial分</span><span class="font_red">{#$member.points#}</span><a href="{#optimize_url('help', 'show','page=4')#}" target="_blank"><i class="icon point"></i></a>
                        </td>
                    </tr>
                </table>

            </div>
            <div class="btnsbox">
                <div class="flbox">
                    <a href="/member_center.php?action=blog_do&do=1" class="btn_b btn_b_edit">編寫blog</a>
                    {#if empty($member.member_type)#}<a href='/member.php?action=regTrial' class="btn_b btn_b_totrydaren"><strong>成為試用專員</strong></a>
                    {#else if $isexp neq 1#}<a href='/member.php?action=regExpert' class="btn_b btn_b_todaren"><strong>成為體驗達人</strong></a>{#/if#}
                </div>
                <div class="frbox">
                    <em class="icon {#if $member.member_type eq 5#}ycicon{#else if $member.member_type eq 1#}icon_master_g{#else#}icon_master_m{#/if#}">{#if $member.member_type eq 5#}尊業體驗團{#else if $member.member_type eq 1#}試用專員{#else#}正式會員{#/if#}</em>
                </div>
                {#if $member._status eq 1#}<p class="statu">審核中</p>{#/if#}
            </div>
        </div>
        <div class="point_intro">
            <p class="recom">推介朋友賺取iTrial分：<input type="text" class="ipt_text" id="share_url" value="{#$member.share_url#}" readOnly="readOnly"/><a class="point_copy" href="javascript:void(0)" id="copy_bt"><strong>複製</strong></a><a target="_blank" href="{#optimize_url('help', 'show','page=4')#}" class="icon question"></a></p>
            <p class="share">你可以透過任何方法，推介朋友申請成為試用專員或體驗達人，便可賺取 1 個 iTrial 分，每天上限為 5 分，即推介 5 位朋友。</p>
        </div>
        <!--試用邀請-->
        <div class="b_box tagb_box">
            <div class="tab_b_box tab_b_box_l">
                <a href="/member_center.php?action=invite">產品 / 活動</a>
                <a href="/member_center.php?action=report">產品報告</a>
                <a href="/member_center.php?action=attention">關注會員 </a>
                <a class="curr" href="/member_center.php?action=points">iTrial分</a>
                <a href="/member_center.php?action=blog">Blog</a>
                <em class="line"></em>
            </div>
            <!--試用邀請-->

            <div class="get_point">
                <table class="tb">
                    <tr><th>得分期間</th><th>分數</th><th>到期日</th></tr>
                    <tr><td>{#date("Y-m-d",strtotime($notices.start_time))#} - {#date("Y-m-d",strtotime($notices.end_time))#}</td>
                        <td><span>{#$notices.surplus_points#}</span><i class="icon point"></i></td>
                        <td>{#$notices.expire_time#}</td>
                    </tr>
                </table>
            </div>
            <div class="get_point">
                <table class="tb" style="width:100%">
                    <tr><th>得分期間</th><th>賺取分數</th></tr>
                    {#foreach  from=$points_arr item=v key=k#}
                    <tr>
                        <td>{#date("Y年m月",strtotime($v.settlement_time))#}</td>
                        <td>{#$v.total_points#}<i class="icon point"></i></td>
                    </tr>
                    {#/foreach#}
                    <tr><td class="no_border text_right">總分</td><td>{#$notices.total_points#}<i class="icon point"></i></td></tr>
                </table>
            </div>
            <div class="show_point" id="show_point">
                <div class="hd">
                    <a class="curr" href="javascript::" onclick="showp(1)" id="point_bt1">賺取記錄</a>
                    <span>|</span>
                    <a  href="javascript::" onclick="showp(2)" id="point_bt2">使用記錄</a>
                    <a href="{#optimize_url('help', 'show','page=4')#}" target="_blank" class="icon question"></a>
                    <a href="javascript::" class="only_month">只顯示最近一個月</a>
                </div>
                <div class="bd" id="tag1">
                    <table class="tb">
                        <tr><th class="th1">項目</th><th class="th2">賺取</th><th class="th3">時間</th></tr>
                        {#foreach  from=$records_add item=v key=k#}
                        <tr>
                            <td>{#$v.name#}{#if !empty($v.remark)#}({#$v.remark#}){#/if#}</td>
                            <td>{#$v.points#}<i class="icon point"></i></td>
                            <td>{#$v.addtime#}</td>
                        </tr>
                        {#/foreach#}
                    </table>
                    <a href="javascript::" onclick="showp(2)" class="btn cost"><strong>查看使用記錄</strong></a>
                </div>
                <div class="bd" id="tag2" style="display: none">
                    <table class="tb">
                        <tr><th class="th1">項目</th><th class="th2">消費</th><th class="th3">時間</th></tr>
                        {#foreach  from=$records_subtract item=v key=k#}
                        <tr>
                            <td>{#$v.name#}{#if !empty($v.remark)#}({#$v.remark#}){#/if#}</td>
                            <td>{#$v.points#}<i class="icon point"></i></td>
                            <td>{#$v.addtime#}</td>
                        </tr>
                        {#/foreach#}
                    </table>
                    <a href="javascript::" onclick="showp(1)" class="btn earn"><strong>查看賺取記錄</strong></a>
                </div>
            </div>

        </div><!--tagb_box-->

    </div>
    <!-- main-->
    <div class="sidebar">
        {#show_block('b2',1,'','sidebar_ad')#}
        {#show_block('b1',2,'','sidebar_function')#}
        {#show_block('b3',0,'','sidebar_search')#}
        {#show_block('b9',0,'','sidebar_tutorial b_box')#}
        {#show_block('b6',0,'','sidebar_facebook')#}
    </div>
    <!-- sidebar -->

</div><!--body-->

{#include file="footer.php"#}